<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
<script type="module">
  import { reactive } from "./03_reactive.js";
  const state = reactive({
    a: 2,
    b: {
      c: 'abc'
    }
  })
  // 读取属性
  // console.log(state)
  // console.log(state.b)
  // console.log(state.a, state.b.c)

  // 修改属性
  // state.a = 3
  // state.b.c = 'cba'

  // 添加新属性
  // state.d = true 

  // 删除属性
  delete state.a 
  console.log(state.a)  // undefined
</script>
</body>
</html>